﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BangChietTinhCoLandTour.aspx.cs" Inherits="DLV.BackEnd.Pages.BangChietTinhCoLandTour" EnableEventValidation="false" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Import Namespace="DLV.Data.Entities" %>
<%@ Import Namespace="DLV.Library.Utilities" %>

<asp:content id="Content1" contentplaceholderid="placeHolderContent" runat="server">
 
    <style>
        .report {
            margin-top: 40px;
        }

        .head {
            width: 100%;
            overflow: hidden;
        }

            .head > .logo {
                width: 20%;
                float: left;
                margin-right: 1%;
            }

                .head > .logo img {
                    display: block;
                    margin: 0 auto;
                }

            .head > .table {
                width: 78%;
                float: right;
            }

                .head > .table > table {
                    width: 100%;
                    border-top: 1px solid #ccc;
                    border-left: 1px solid #ccc;
                    background-color: #FCFAFA;
                }

                    .head > .table > table th {
                        padding: 10px 0;
                        font-size: 20px;
                        border-bottom: 1px solid #ccc;
                        border-right: 1px solid #ccc;
                        background-color: #F2DCDB;
                    }

                    .head > .table > table td {
                        padding: 7px;
                         border-bottom: 1px solid #ccc;
                        border-right: 1px solid #ccc;
                    }

        .service {
            width: 100%;
            margin-top: 20px;
        }

            .service > table {
                width: 100%;
                margin-bottom: 20px;
                 border-bottom: 1px solid #ccc;
                 border-right: 1px solid #ccc;
            }

                .service > table th {
                    padding: 5px 0;
                    border-bottom: 1px solid #ccc;
                    border-right: 1px solid #ccc;
                    background-color: #F2DCDB;
                    color: #1575bc;
                }

                    .service > table th.first {
                        background-color: #92CDDC;
                        width: 8%;
                    }

                .service > table td {
                    padding: 7px;
                    border-bottom: 1px solid #ccc;
                    border-right: 1px solid #ccc;
                }

                .service > table .tr {
                    text-align: right;
                }

        .classname {
            display: block;
        }

            .classname > li {
                list-style: none;
                display: block;
                border: 1px solid #ccc;
                width: 99%;
                height: 30px;
                background-color: #F4f4f4;
                font-size: 14px;
                line-height: 30px;
                font-weight: bold;
                padding-left: 10px;
                border-radius: 3px 0;
                text-transform: uppercase;
                margin-top: -15px;
                color: #1575bc;
                padding: 4px 0px 4px 8px;
            }

        div {
            margin: 0;
            padding: 0;
        }

        #li-air {
            margin-top: 20px;
        }

        .add {
            border: none;
            background-color: white;
            width: 120px;
            height: 20px;
            background-image: url("../images/icon/add.png");
            background-repeat: no-repeat;
            text-align: right;
        }

        input[class^="btnUpdate"] {
            border: none;
            background-color: white;
            width: 20px;
            height: 20px;
            background-image: url("../images/icon/edit.png");
            background-repeat: no-repeat;
        }

        #btnUpdateTour {
            border: none;
            background-color: white;
            width: 80px;
            height: 20px;
            background-image: url("../images/icon/edit.png");
            background-repeat: no-repeat;
            text-align: right;
        }

        input[class^="btnDelete"] {
            border: none;
            background-color: white;
            width: 20px;
            height: 20px;
            background-image: url("../images/icon/delete.png");
            background-repeat: no-repeat;
        }

        #btnCloseTour, .cancel, input[id^="btnDelete"] {
            border: none;
            background-color: #E7E7D9;
            width: 55px;
            height: 20px;
            background-image: url("../images/icon/cancel.gif");
            background-repeat: no-repeat;
            text-align: right;
            margin-left: 20px;
        }

        #btnCloseTour {
            background-color: white;
        }

        #btnSaveTour, input[class^="btnInsert"], input[id^="btnInsert"] {
            border: none;
            background-color: white;
            width: 60px;
            height: 20px;
            background-image: url("../images/icon/save.png");
            background-repeat: no-repeat;
            text-align: right;
        }

        input[class^="btnInsert"], input[id^="btnInsert"] {
            background-color: #E7E7D9;
        }

        .note {
            border: none;
            background-color: white;
            width: 20px;
            height: 20px;
            background-image: url("../images/icon/tag_yellow.png");
            background-repeat: no-repeat;
        }
    </style>
    <link href="../js/jqwidAdd/addTour/cssTour/addTour.css" rel="stylesheet" />
    <div class="report">
        <div class="head">
            <div class="logo">
                <a href="http://dulichviet.com.vn"><img src="/images/logo.png" /></a>
            </div>    
            <div class="table">
                <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <th colspan="4">BẢNG TÍNH GIÁ</th>
                    </tr>
                    <tr>
                        <td><b>Tên đoàn</b></td>
                        <td><%=tourInfo.TourName %></td>
                        <td><b>Code đoàn</b></td>
                        <td>DLV<%=tourInfo.TourId %></td>
                    </tr>
                    <tr>
                        <td><b>Loại hình đoàn</b></td>
                        <td><%=tourInfo.GroupType %></td>
                        <td><b>Loại tour</b></td>
                        <td><%=tourInfo.TourTypeName %></td>
                    </tr>
                    <tr>
                        <td><b>Điểm khởi hành</b></td>
                        <td><%=tourInfo.LocationName %></td>
                        <td><b>Hành trình</b></td>
                        <td><%=tourInfo.Schedule %></td>
                    </tr>
                    <tr>
                        <td><b>Số lượng khách</b></td>
                        <td class="edit-tourItem">
                            Người lớn:
                            <asp:Label class="lbTour" ID="lbQuantityAdultsTour" runat="server"></asp:Label> 
                            <asp:TextBox class="ctTour"  id="txtQuantityAdultsTour" runat="server" Width="50px"></asp:TextBox>
                            |
                            Trẻ em:
                            <asp:Label class="lbTour" ID="lbQuantityChildTour" runat="server"></asp:Label>
                            <asp:TextBox class="ctTour"  id="txtQuantityChildTour" runat="server" Width="50px"></asp:TextBox>
                            |
                             Trẻ nhỏ:
                            <asp:Label class="lbTour" ID="lbQuantityBabyTour" runat="server"></asp:Label>
                            <asp:TextBox class="ctTour"  id="txtQuantityBabyTour" runat="server" Width="50px"></asp:TextBox>
                        </td>
                       <td><b>Ngày khởi hành</b></td>
                        <td>
                            <asp:Label class="lbTour" ID="lbBeginDateTour" runat="server"></asp:Label>
                            
                            <asp:Label class="lbTour" ID="lbBeginHourTour" runat="server"></asp:Label>
                            
                            <asp:Label class="lbTour" ID="lbBeginMinuteTour" runat="server"></asp:Label>
                            <input class="ctTour" type="text" id="dteBeginDateTour" placeholder="Click để chọn ngày" readonly="readonly" runat="server" />
                            <asp:DropDownList class="ctTour" ID="ddlBeginHourTour" runat="server" Width="55px"></asp:DropDownList>
                            <asp:DropDownList class="ctTour" ID="ddlBeginMinuteTour" runat="server" Width="55px"></asp:DropDownList>
                        </td>
                       
                    </tr>
                   <tr>
                        
                        <td><b>Ngày kết thúc</b></td>
                        <td>
                            <asp:Label class="lbTour" ID="lbEndDateTour" runat="server"></asp:Label>
                            
                            <asp:Label class="lbTour" ID="lbEndHourTour" runat="server"></asp:Label>
                            
                            <asp:Label class="lbTour" ID="lbEndMinuteTour" runat="server"></asp:Label>
                            <input class="ctTour" type="text" id="dteEndDateTour" placeholder="Click để chọn ngày" readonly="readonly" runat="server" />
                            <asp:DropDownList class="ctTour" ID="ddlEndHourTour" runat="server" Width="55px"></asp:DropDownList>
                            <asp:DropDownList class="ctTour" ID="ddlEndMinuteTour" runat="server" Width="55px"></asp:DropDownList>
                        </td>
                       <td><b>Tổng số ngày</b></td>
                        <td>
                            <asp:Label class="lbTour" ID="lbTotalDayTour" runat="server"></asp:Label> 
                            <asp:TextBox class="ctTour" id="txtTotalDayTour" runat="server" Width="50px" ></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        
                        <td><b>Tổng số đêm</b></td>
                        <td>
                            <asp:Label class="lbTour" ID="lbTotalNightTour" runat="server"></asp:Label> 
                            <asp:TextBox class="ctTour" id="txtTotalNightTour" runat="server" Width="50px" ></asp:TextBox>
                        </td>
                         <td><b>Mùa</b></td>
                        <td><%=tourInfo.Season %></td>
                    </tr>
                     <tr>
                       
                        <td><b>Thị trường</b></td>
                        <td><%=tourInfo.MartName %></td>
                        <td colspan="2">
                            <input  id="btnUpdateTour" type="button" value="Cập nhật" onclick="$('.edit-tourItem').show(); $('.display-tourItem').hide()"/>
                            <asp:LinkButton class="ctTour" ID="lbtSave" runat="server" Text="" onclick="lbtSave_Click" CssClass="toolbar">
					            <input class="ctTour" id="btnSaveTour" type="button" value="Lưu"  onclick="$('.edit-tourItem').hide()" />
                            </asp:LinkButton>
		                    <asp:LinkButton class="ctTour" ID="lbtClose" runat="server" Text="" onclick="lbtClose_Click" 
                                 CssClass="toolbar" CausesValidation="False">
					            <input class="ctTour" id="btnCloseTour" type="button" value="Hủy" />
				            </asp:LinkButton>						    
                        </td>
                    </tr>
                </table>
                </div>
        </div>
        
            <ul class="classname">
                <%-------------------------------------------------------------------------------------Máy bay------------%>
                <li id="li-air"><a class="t_stt">1</a>CHIẾT TÍNH VÉ MÁY BAY</li>
                <div class="service">
                <table cellpadding="0" cellspacing="0" border="0" id="table-air">
                
                    <tr>
                        <th rowspan="2">STT </th>
                        <th rowspan="2">HÀNH TRÌNH</th>
                        <th rowspan="2">NGÀY ĐI</th>
                        <th rowspan="2">LƯỢT BAY</th>
                        <th rowspan="2">NHÀ CUNG CẤP</th>
                        <th rowspan="2">VÉ</th>
                        <th colspan="3">GIÁ/HẠNG VÉ/KHOANG</th>
                        <th colspan="3">SỐ KHÁCH</th>
                        <th rowspan="2">VAT</th>
                        <th rowspan="2">TỔNG CHI PHÍ</th>
                        <th rowspan="2">GHI CHÚ</th>
                        <th rowspan="2">THAO TÁC</th>
                    </tr>
                    <tr>
                        <th>NL</th>
                        <th>TE</th>
                        <th>TN</th>
                        <th>NL</th>
                        <th>TE</th>
                        <th>TN</th>
                    </tr>
                
                    <% foreach (DLV.Data.Entities.CalculatorInfo calculatorAir in TicketAirs)
                       { %>
                    <tr class="ListAir" id="ticket-air-<%=calculatorAir.CalculatorId %>">
                        <td></td>
                        <td><%=calculatorAir.ScheduleName %></td>
                        <td><%=calculatorAir.DateBegin.ToShortDateString() %></td>
                        <td ><%=calculatorAir.FlightArrivals %></td>
                        <td><%=calculatorAir.ConcernFullName %></td>
                        <td> <%=calculatorAir.TicketName %></td>
                         <td ><%=calculatorAir.PriceAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                        <td ><%=calculatorAir.PriceChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                        <td ><%=calculatorAir.PriceBaby.ToString() %></td>
                        <td><%=calculatorAir.QuantityAdults %></td>
                        <td ><%=calculatorAir.QuantityChild %></td>
                        <td ><%=calculatorAir.QuantityBaby %></td>
                        <td><%=calculatorAir.Vat %></td>
                        <td ><%=(calculatorAir.TotalPriceStationAdults+calculatorAir.TotalPriceStationChild+calculatorAir.TotalPriceStationBaby).ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    
                        <td><%--<input class="edit" itemid="<%=priceItemInfo.PriceItemId %>" type="button" onclick="openPopup('ticket-air')" value="Sửa" />--%></td>
                        <td>
                            <input class="btnUpdateAir" onclick="openPopup('ticket-air')"  type="button" value="" calculatorid="<%=calculatorAir.CalculatorId %>" />
                            <input class="btnDeleteAir"  type="button" value="" calculatorid="<%=calculatorAir.CalculatorId %>" />
                        </td>
                    </tr>
                    <% } %>
              
                    <tr id="new-ticket-air">
                        <td></td>
                        <td colspan="15"><b><input class="add" id="openPopupAir" onclick="openPopup('ticket-air')" type="button"  value="Thêm lịch trình" /></b></td>
                    </tr>
               
                    <tr>
                    
                        <td colspan="13"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                        <td class="tr" id="TotalTicketAirPricesAdults"><%=(int)TotalTicketAirPricesAdults%></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                    
                        <td colspan="13"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                        <td class="tr" id="TotalTicketAirPricesChild"><%=(int)TotalTicketAirPricesChild %></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                    
                        <td colspan="13"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ NHỎ</b></td>
                        <td class="tr" id="TotalTicketAirPricesBaby"><%=(int)TotalTicketAirPricesBaby %></td>
                        <td></td>
                        <td></td>
                    </tr>
                     <tr>
                    
                        <td colspan="13"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                        <td class="tr" id="TotalTicketAirPrices"><%=(int)TotalTicketAirPrices %></td>
                        <td></td>
                        <td></td>
                    </tr>
                </table>
                </div>
                <%--------------------------------------------------------------------------------Huong dan vien-----------------%>
                <li id="li-travel-guide"><a class="t_stt">2</a>CHIẾT TÍNH HƯỚNG DẪN VIÊN</li>
                <div class="service">
                <table id="table-travel-guide" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <th>STT</th>
                        <th>LOẠI HDV</th>
                        <th>NGÀY<br /> KHỞI HÀNH</th>
                        <th>NGÀY<br/>KẾT THÚC</th>
                        <th>TỔNG SỐ NGÀY</th>
                        <th>NGOẠI NGỮ</th>
                        <th>GIỚI TÍNH</th>
                        <th>TRÌNH ĐỘ</th>
                        <th>HDV</th>
                        <th>TIỀN CÔNG</th>
                        <th>TIỀN TIP</th>
                        <th>VAT</th>
                        <th>TỔNG CHI PHÍ</th>
                        <th>GHI CHÚ</th>
                        <th>THAO TÁC</th>
                    </tr>
                    <% foreach (DLV.Data.Entities.CalculatorInfo travelGuideCashInfo in TravelGuideCashs)
                       {%>
                    <tr class="ListTravelGuide" id="TravelGuide-"<%=travelGuideCashInfo.CalculatorId %>>
                        <td></td>
                        <td><%=travelGuideCashInfo.TravelGuideType %></td>
                        <td><%=travelGuideCashInfo.DateBegin.ToString("dd/MM/yyyy") %></td>
                        <td><%=travelGuideCashInfo.DateEnd.ToString("dd/MM/yyyy") %></td>
                        <td class="tr"><%=(travelGuideCashInfo.DateEnd-travelGuideCashInfo.DateBegin).Days %></td>
                        <td><%=travelGuideCashInfo.LanguageName %></td>
                        <td><%=travelGuideCashInfo.Gender %></td>
                        <td><%=travelGuideCashInfo.Level %></td>
                        <td><%=travelGuideCashInfo.FullName %></td>
                    
                    
                        <td class="tr"><%=travelGuideCashInfo.PriceAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                        <td class="tr"><%=travelGuideCashInfo.PriceChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                        <td><%=travelGuideCashInfo.Vat%></td>
                        <td class="tr"><%=travelGuideCashInfo.TotalPriceTravelGuide%></td>
                    
                        <td></td>
                        <td>
                            <input class="btnUpdateTravelGuide" onclick="openPopup('ticket-travelGuide')" type="button" value="" calculatorid="<%=travelGuideCashInfo.CalculatorId %>" />
                            <input class="btnDeleteTravelGuide"  type="button" value="" calculatorid="<%=travelGuideCashInfo.CalculatorId %>" />
                        </td>
                    </tr>
                    <% } %>
                    <tr id="new-travelGuide">
                        <td></td>
                        <td colspan="14"><b><input class="add" id="openPopupTravelGuide" onclick="openPopup('ticket-travelGuide')" type="button"  value="Thêm lịch trình" /></b></td>
                    </tr>
                     <tr>
                        <td colspan="12"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                        <td class="tr" id="TotalTravelGuidePricesAdults"><%=(int)TotalTravelGuidePricesAdults %></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td colspan="12"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                        <td class="tr" id="TotalTravelGuidePricesChild"><%=(int)TotalTravelGuidePricesChild %></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td colspan="12"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                        <td class="tr" id="TotalTravelGuidePrices" ><%=(int)TotalTravelGuidePrices %></td>
                        <td></td>
                        <td></td>
                    
                    </tr>
                </table>
                </div>
                <%-------------------------------------------------------------------------------------BAO HIEM---------------%>
                <li id="li-insurance"><a class="t_stt">3</a>CHIẾT TÍNH BẢO HIỂM</li>
                <div class="service">
                <table id="table-insurance" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <th rowspan="2">STT</th>
                        <th rowspan="2">NHÀ CUNG CẤP</th>
                        <th rowspan="2">BẢO HIỂM</th>
                        <th rowspan="2">NGÀY<br /> BẮT ĐẦU</th>
                        <th rowspan="2">NGÀY<br /> HẾT HẠN</th>
                        <th rowspan="2">SỐ NGÀY <br /> BẢO HIỂM</th>
                        <th colspan="3">CHI PHÍ</th>
                        <th colspan="3">SỐ KHÁCH</th>
                        <th rowspan="2">VAT</th>
                        <th rowspan="2">TỔNG</th>
                        <th rowspan="2">GHI CHÚ</th>
                        <th rowspan="2"></th>
                    </tr>
                    <tr>
                        <th>NGƯỜI LỚN</th>
                        <th>TRẺ EM</th>
                        <th>TRẺ NHỎ</th>
                        <th>NGƯỜI LỚN</th>
                        <th>TRẺ EM</th>
                        <th>TRẺ NHỎ</th>
                    </tr>

                    <% foreach (DLV.Data.Entities.CalculatorInfo calculatorInsurance in InsuranceList)
                       { %>
                    <tr class="ListInsurance" id="Insurance-<%=calculatorInsurance.CalculatorId%>">
                        <td></td>
                        <td><%=calculatorInsurance.PartnerName%></td>
                        <td><%=calculatorInsurance.InsuranceName%></td>
                        <td><%=calculatorInsurance.DateBegin.ToShortDateString()%></td>
                        <td><%=calculatorInsurance.DateEnd.ToShortDateString()%></td>
                        <td><%=calculatorInsurance.CountNightHotel+1%></td>
                        <td><%=calculatorInsurance.PriceAdults.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                        <td><%=calculatorInsurance.PriceChild.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                        <td><%=calculatorInsurance.PriceBaby.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                        <td><%=calculatorInsurance.QuantityAdults%></td>
                        <td><%=calculatorInsurance.QuantityChild%></td>
                        <td><%=calculatorInsurance.QuantityBaby%></td>
                        <td><%=calculatorInsurance.Vat%></td>
                        <td><%=(calculatorInsurance.TotalPriceInsuranceAdults+calculatorInsurance.TotalPriceInsuranceChild+calculatorInsurance.TotalPriceInsuranceBaby).ToString("#,###", new CultureInfo("vi-VN"))%></td>
                        <td></td>
                        <td>
                            <input class="btnUpdateInsurance" onclick="openPopup('ticket-insurance')"  type="button" value="" calculatorid="<%=calculatorInsurance.CalculatorId%>" />
                            <input class="btnDeleteInsurance"  type="button" value="" calculatorid="<%=calculatorInsurance.CalculatorId%>" />
                        </td>
                    </tr>
                
                    <%} %>
                    <tr></tr>
                     <tr id="new-ticket-insurance">
                    
                        <td></td>
                        <td colspan="15"><b><input class="add" id="openPopupInsurance" onclick="openPopup('ticket-insurance')" type="button"  value="Thêm lịch trình" /></b></td>
                    
                    </tr>
                    <tr>
                        <td colspan="13"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                        <td class="tr" id="TotalInsurancePrices"><%=TotalInsurancePrices%></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td colspan="13"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                        <td class="tr" id="TotalInsurancePricesAdults"><%=(int)TotalInsurancePricesAdults%></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td colspan="13"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                        <td class="tr" id="TotalInsurancePricesChild"><%=(int)TotalInsurancePricesChild%></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td colspan="13"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ NHỎ</b></td>
                        <td class="tr" id="TotalInsurancePricesBaby"><%=(int)TotalInsurancePricesBaby%></td>
                        <td></td>
                        <td></td>
                    </tr>
            </table>
                </div>
                <%-----------------------------------------------------------------------------------------Visa-------------------%>
                <li id="li-visa"><a class="t_stt">4</a>CHIẾT TÍNH VISA</li>
                <div class="service">
                <table id="table-visa" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <th rowspan="2" class="first">VISA</th>
                        <th rowspan="2">NHÀ CUNG CẤP</th>
                        <th rowspan="2">LOẠI VISA</th>
                        <th rowspan="2">VISA</th>
                        <th colspan="3">CHI PHÍ NGƯỜI LỚN</th>
                        <th colspan="3">CHI PHÍ TRẺ EM</th>
                         <th colspan="3">CHI PHÍ TRẺ NHỎ</th>
                        <th colspan="3">SỐ KHÁCH</th>
                        <th rowspan="2">VAT</th>
                        <th rowspan="2">TỔNG</th>
                        <th rowspan="2">GHI CHÚ</th>
                        <th rowspan="2"></th>
                    </tr>
                    <tr>
                        <th>LÃNH SỰ</th>
                        <th>DỊCH HỒ SƠ</th>
                        <th>CHI KHÁC</th>

                        <th>LÃNH SỰ</th>
                        <th>DỊCH HỒ SƠ</th>
                        <th>CHI KHÁC</th>

                        <th>LÃNH SỰ</th>
                        <th>DỊCH HỒ SƠ</th>
                        <th>CHI KHÁC</th>

                        <th>NL</th>
                        <th>TE</th>
                        <th>TN</th>
                    </tr>

                    <% foreach (DLV.Data.Entities.CalculatorInfo calculatorInfoV in tourVisa)
                       { %>
                    <tr class="ListVisa" id="menu-<%=calculatorInfoV.CalculatorId %>">
                        <td></td>
                        <td><%=calculatorInfoV.PartnerName %></td>
                        <td><%=calculatorInfoV.VisaTypeName %></td>
                        <td><%=calculatorInfoV.VisaName %></td>
                        <td><%=calculatorInfoV.PriceAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                        <td><%=calculatorInfoV.TranslateAdult.ToString("#,###", new CultureInfo("vi-VN"))  %></td>
                        <td><%=calculatorInfoV.OtherCostAdult.ToString("#,###", new CultureInfo("vi-VN"))%></td>

                        <td><%=calculatorInfoV.PriceChild.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                        <td><%=calculatorInfoV.TranslateChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                        <td><%=calculatorInfoV.OtherCostChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>

                        <td><%=calculatorInfoV.PriceBaby.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                        <td><%=calculatorInfoV.TranslateBaby.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                        <td><%=calculatorInfoV.OthercostBaby.ToString("#,###", new CultureInfo("vi-VN")) %></td>

                        <td><%=calculatorInfoV.QuantityAdults %></td>
                        <td><%=calculatorInfoV.QuantityChild %></td> 
                         <td><%=calculatorInfoV.QuantityBaby %></td> 
                        <td><%=calculatorInfoV.Vat %></td>
                        <td><%=(calculatorInfoV.TotalPriceVisaChild + calculatorInfoV.TotalPriceVisaAdults+ calculatorInfoV.TotalPriceVisaBaby).ToString("#,###", new CultureInfo("vi-VN")) %></td>
                        <td></td>
                        <td>
                            <input class="btnUpdateVisa" type="button" onclick="openPopup('ticket-visa')" value="" calculatorid="<%=calculatorInfoV.CalculatorId %>" />
                            <input class="btnDeleteVisa" type="button" value="" calculatorid="<%=calculatorInfoV.CalculatorId %>" />
                        </td>
                    </tr>
                    <%} %>
                    <tr></tr>
                    <tr id="new-Visa">
                        <td></td>
                        <td colspan="19"><b><input class="add" id="openPopupVisa" onclick="openPopup('ticket-visa')" type="button"  value="Thêm lịch trình" /></b></td>
                    </tr>
                    <tr>
                    
                        <td colspan="17"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                        <td class="tr" id="TotalVisaPrices"><%=(int)TotalVisaPrices %></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                 
                        <td colspan="17"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                        <td class="tr" id="TotalVisaAdults"><%=(int)TotalVisaAdults %></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                  
                        <td colspan="17"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM </b></td>
                        <td class="tr" id="TotalVisaChild"><%=(int)TotalVisaChild %></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                   
                        <td colspan="17"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ NHỎ </b></td>
                        <td class="tr" id="TotalVisaBaby"><%=(int)TotalVisaBaby %></td>
                        <td></td>
                        <td></td>
                    </tr>

                </table>
                </div>
                <%-----------------------------------------------------------------------------land tour-----------%>
                <li id="li-land-tour"><a class="t_stt">5</a>CHIẾT TÍNH LAND TOUR</li>
                <div class="service">
                <table id="table-land-tour" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <th rowspan="2">STT</th>
                    <th rowspan="2">NHÀ CUNG CẤP</th>
                    <th rowspan="2">LAND TOUR</th>
                    <th rowspan="2">NGÀY<br /> BẮT ĐẦU</th>
                    <th colspan="3">CHI PHÍ</th>
                    <th colspan="3">SỐ KHÁCH</th>
                    <th rowspan="2">VAT</th>
                    <th rowspan="2">TỔNG</th>
                    <th rowspan="2">GHI CHÚ</th>
                    <th rowspan="2"></th>
                </tr>
                <tr>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                    <th>TRẺ NHỎ</th>
                    <th>NGƯỜI LỚN</th>
                    <th>TRẺ EM</th>
                    <th>TRẺ NHỎ</th>
                </tr>

                <% foreach (DLV.Data.Entities.CalculatorInfo calculatorLandTour in LandTourList)
                   { %>
                <tr class="ListLandTour" id="LandTour-<%=calculatorLandTour.CalculatorId%>">
                    <td></td>
                    <td><%=calculatorLandTour.PartnerName%></td>
                    <td><%=calculatorLandTour.LandTourName%></td>
                    <td><%=calculatorLandTour.DateBegin.ToShortDateString()%></td>
                   <td><%=calculatorLandTour.PriceAdults.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    <td><%=calculatorLandTour.PriceChild.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    <td><%=calculatorLandTour.PriceBaby.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    <td><%=calculatorLandTour.QuantityAdults%></td>
                    <td><%=calculatorLandTour.QuantityChild%></td>
                    <td><%=calculatorLandTour.QuantityBaby%></td>
                    <td><%=calculatorLandTour.Vat%></td>
                    <td><%=(calculatorLandTour.TotalPriceLandTourAdults+calculatorLandTour.TotalPriceLandTourChilds+calculatorLandTour.TotalPriceLandTourBabys).ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    <td><%=calculatorLandTour.Note %></td>
                    <td>
                        <input class="btnUpdateLandTour" onclick="openPopup('ticket-landtour')" type="button" value="" calculatorid="<%=calculatorLandTour.CalculatorId%>" />
                        <input class="btnDeleteLandTour"  type="button" value="" calculatorid="<%=calculatorLandTour.CalculatorId%>" />
                    </td>
                </tr>
                
                <%} %>
                <tr></tr>
                 <tr id="new-ticket-LandTour">
                    <td></td>
                    <td colspan="19"><b><input class="add" id="openPopupLandTour" onclick="openPopup('ticket-landtour')" type="button"  value="Thêm lịch trình" /></b></td>
                </tr>
                <tr>
                    <td colspan="11"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                    <td class="tr" id="TotalLandTourPrices"><%=TotalLandTourPrices.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    </tr>
                <tr>
                    <td colspan="11"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                    <td class="tr" id="TotalLandTourPricesAdults"><%=TotalLandTourPricesAdults.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    </tr>
                <tr>
                    <td colspan="11"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                    <td class="tr" id="TotalLandTourPricesChild"><%=TotalLandTourPricesChild.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                   </tr>
                <tr>
                    <td colspan="11"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ NHỎ</b></td>
                    <td class="tr" id="TotalLandTourPricesBaby"><%=TotalLandTourPricesBaby.ToString("#,###", new CultureInfo("vi-VN"))%></td>
                    
                </tr>
        </table>
                </div>
                <%----------------------------------------------------------------------------------- Hoa Hong-----------------%>
                <li id="li-commission"><a class="t_stt">6</a>CHIẾT TÍNH HOA HỒNG</li>
                <div class="service">
                <table id="table-commission" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <th rowspan="2" class="first">HOA HỒNG</th>
                        <th rowspan="2">NGƯỜI NHẬN </th>
                        <th colspan="3">SỐ KHÁCH</th>
                        <th colspan="3">HOA HỒNG/KHÁCH</th>
                        <th rowspan="2">VAT</th>
                        <th rowspan="2">TỔNG CHI<br /> HOA HỒNG</th>
                        <th rowspan="2">GHI CHÚ</th>
                        <th rowspan="2"></th>
                    </tr>
                    <tr>
                        <th>NL</th>
                        <th>TE</th>
                        <th>TN </th>
                        <th>NL</th>
                        <th>TE</th>
                        <th>TN </th>
                    </tr>

                    <% foreach (DLV.Data.Entities.CalculatorInfo calculatorListHH in tourHH)
                       { %>
                    <tr class="ListHH" id="HH-<%=calculatorListHH.CalculatorId %>">
                        <td></td>
                        <td><%=calculatorListHH.TravelGuideType %></td>
                        <td><%=calculatorListHH.QuantityAdults %></td>
                        <td><%=calculatorListHH.QuantityChild %></td>
                        <td><%=calculatorListHH.QuantityBaby %></td>
                        <td><%=calculatorListHH.PriceAdults %></td>
                        <td><%=calculatorListHH.PriceChild %></td>
                        <td><%=calculatorListHH.PriceBaby %></td>
                        <td><%=calculatorListHH.Vat %></td>
                        <td><%=(calculatorListHH.TotalPriceHhAdults + calculatorListHH.TotalPriceHhBaby+ calculatorListHH.TotalPriceHhChild).ToString("#,###", new CultureInfo("vi-VN")) %></td>
                        <td></td>
                        <td>
                            <input class="btnUpdateHH" onclick="openPopup('ticket-commission')" type="button" value="" calculatorid="<%=calculatorListHH.CalculatorId %>" />
                            <input class="btnDeleteHH" type="button" value="" calculatorid="<%=calculatorListHH.CalculatorId %>" />
                        </td>
                    </tr>

                    <%} %>
                    <tr></tr>
                    <tr id="new-HH">
                        <td></td>
                        <td colspan="14"><b><input class="add" id="openPopupCommission" onclick="openPopup('ticket-commission')" type="button"  value="Thêm lịch trình" /></b></td>
                    </tr>
                    <tr>
                    
                        <td colspan="9"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                        <td class="tr" id="TotalHHPrices"><%=(int)TotalHHPrices %></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                    
                        <td colspan="9"><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                        <td class="tr" id="TotalHHAdults"><%=(int)TotalHHAdults %></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                    
                        <td colspan="9"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                        <td class="tr" id="TotalHHChild"><%=(int)TotalHHChild %></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                    
                        <td colspan="9"><b>TỔNG CHI PHÍ/ KHÁCH TRẺ NHỎ</b></td>
                        <td class="tr" id="TotalHHBaby"><%=(int)TotalHHBaby %></td>
                        <td></td>
                        <td></td>
                    </tr>

                </table>
                </div>
                <%----------------------------------------------------------------------tong------------------------------%>
                <li id="li-calculator"><a class="t_stt">7</a>CHIẾT TÍNH</li>
                <div class="service">
                    <table class="table-calculator" cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <th class="first">TỔNG CHI PHÍ</th>
                            <th></th>
                            <th></th>
                            <th>GHI CHÚ</th>
                        </tr>
               
                        <tr>
                            <th rowspan="4">GIÁ NETT</th>
                            <td ><b>TỔNG CHI PHÍ/ KHÁCH NGƯỜI LỚN</b></td>
                            <td id="TotalPriceCaculatorAdults"></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td><b>TỔNG CHI PHÍ/ KHÁCH TRẺ EM</b></td>
                            <td id="TotalPriceCaculatorChild"></td>
                            <td></td>
                        </tr>
                         <tr>
                            <td><b>TỔNG CHI PHÍ/ KHÁCH TRẺ NHỎ</b></td>
                            <td id="TotalPriceCaculatorBaby"></td>
                            <td></td>
                        </tr>
                         <tr>
                    
                            <td><b>TỔNG GIÁ BÁN ĐOÀN</b></td>
                            <td id="TotalPriceCaculator"></td>
                            <td></td>
                        </tr>
                    </table>
                    <table class="table-calculator" cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <th class="first">CHI PHÍ QUẢN LÝ</th>
                            <th></th>
                            <th>TỔNG CHI PHÍ</th>
                            <th>VAT</th>
                            <th>GHI CHÚ</th>
                        </tr>
                        <tr>
                            <td></td>
                            <td><b>THUẾ GIÁ TRỊ GIA TĂNG</b></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td><b>CHI PHÍ QUẢN LÝ DOANH NGHIỆP</b></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td><b>THUẾ THU NHẬP DOANH NGHIỆP</b></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                    </table>
                    <table class="table-calculator" cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <th class="first">GIÁ BÁN</th>
                            <th></th>
                            <th></th>
                            <th>%</th>
                            <th>GHI CHÚ</th>
                        </tr>
                        <tr>
                            <th rowspan="4">GIÁ BÁN</th>
                            <td><b>TỔNG GIÁ BÁN/ KHÁCH NGƯỜI LỚN</b></td>
                            <td><asp:TextBox ID="TotalSalePriceCaculatorAdults" runat="server"></asp:TextBox></td>
                            <td></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td><b>TỔNG GIÁ BÁN/ KHÁCH TRẺ EM</b></td>
                            <td><asp:TextBox ID="TotalSalePriceCaculatorChild" runat="server"></asp:TextBox></td>
                            <td></td>
                            <td></td>
                        </tr>
                         <tr>                    
                            <td><b>TỔNG GIÁ BÁN/ KHÁCH TRẺ NHỎ</b></td>
                            <td><asp:TextBox ID="TotalSalePriceCaculatorBaby" runat="server"></asp:TextBox></td>
                            <td></td>
                            <td></td>
                        </tr>
                         <tr>
                            <td><b>TỔNG GIÁ BÁN ĐOÀN</b></td>
                            <td><asp:TextBox ID="TotalSalePriceCaculator" runat="server"></asp:TextBox></td>
                            <td></td>
                            <td></td>
                        </tr>
                    </table>
                    <table class="table-calculator" cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <th class="first">TỔNG CHI PHÍ</th>
                            <th></th>
                            <th></th>
                            <th>GHI CHÚ</th>
                        </tr>
                        <tr>
                            <th rowspan="4">LỢI NHUẬN</th>
                            <td><b>TỔNG LỢI NHUẬN/ KHÁCH NGƯỜI LỚN</b></td>
                            <td id="ProfitCaculatorAdults"></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td><b>TỔNG LỢI NHUẬN/ KHÁCH TRẺ EM</b></td>
                            <td id="ProfitCaculatorChild"></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td><b>TỔNG LỢI NHUẬN/ KHÁCH TRẺ NHỎ</b></td>
                            <td id="ProfitCaculatorBaby"></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td><b>TỔNG LỢI NHUẬN ĐOÀN</b></td>
                            <td id="ProfitCaculator"></td>
                            <td></td>
                        </tr>
                    </table>
                </div>
            </ul>
    </div>
   <%-------------------------------------------------------------------------Popup---------------------%>
  <link href="/css/popup.css" rel="stylesheet" />
        <script src="/js/jquery.popup.js"></script>
        <div class="popup-wrapper"></div>
    <%-------------------------------------------------------------popup may bay------------------------%>
        <div class="popup-main popup-ticket-air">
        <div class="popup-content">
            <div class="m" style="float:left; width:100%">
                <div class="admin-left">
                    <table class="adminform ticket-air">
                        <tr >
                            <td>Hành trình:</td>
                            <td ><asp:DropDownList ID="ddlScheduleAir" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Ngày đi:</td>
                            <td ><input type="text" id="dteGoDateAir" placeholder="Click để chọn ngày" readonly="readonly" runat="server" /></td>
                        </tr>
                        <tr>
                            <td>Lượt bay:</td>
                            <td ><asp:DropDownList ID="ddlFlightArrivalsAir" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Hãng hàng không:</td>
                            <td ><asp:DropDownList ID="ddlConcernAir" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Vé:</td>
                            <td><asp:DropDownList ID="ddlTicketAir" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Giá vé người lớn:</td>
                            <td ><asp:TextBox id="txtPriceAdultAir" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Giá vé trẻ em:</td>
                            <td ><asp:TextBox id="txtPriceChildAir" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Giá vé trẻ nhỏ:</td>
                            <td ><asp:TextBox id="txtPriceBabyAir" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Số lượng người lớn:</td>
                            <td ><asp:TextBox id="txtQuantityAdultsAir" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Số lượng trẻ em:</td>
                            <td ><asp:TextBox id="txtQuantityChildAir" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Số lượng trẻ nhỏ:</td>
                            <td ><asp:TextBox id="txtQuantityBabyAir" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Vat:</td>
                            <td><asp:TextBox id="txtVatAir" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Tổng chi phí:</td>
                            <td ><asp:TextBox id="txtTotalPriceAir" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Ghi chú:</td>
                            <td><asp:TextBox ID="txtNoteAir" runat="server" TextMode="MultiLine" width="390px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td id="toolbar-save" class="button">
                                <input  id="btnInsertAir" type="button" value="Thêm" calculatorid="-1"/>
                                <input id="btnDeleteAir" class="btnDeleteAir"  type="button" value="Hủy" calculatorid="-1" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>  
    <%-------------------------------------------------------------popup bao hiem------------------------%>
        <div class="popup-main popup-ticket-insurance">
        <div class="popup-content">
            <div class="m" style="float:left; width:100%">
                <div class="admin-left">
                    <table >
                        <tr >
                            <td>Nhà cung cấp: </td>
                            <td><asp:DropDownList ID="ddlPartnerInsurance" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Bảo hiểm:</td>
                            <td><asp:DropDownList ID="ddlInsurance" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Ngày bắt đầu:</td>
                            <td><input type="text" id="dteBeginDateInsurance" placeholder="Click chọn ngày" readonly="readonly" runat="server" /></td>
                        </tr>
                        <tr>
                            <td>Ngày hết hạn:</td>
                            <td><input type="text" id="dteEndDateInsurance" placeholder="Click chọn ngày" readonly="readonly" runat="server" /></td>
                        </tr>
                        <tr>
                            <td>Số ngày bảo hiểm:</td>
                            <td><asp:Label runat="server" ID="lbCountNightInsurance"></asp:Label></td>
                        </tr>
                        <tr>
                            <td>Giá người lớn:</td>
                            <td><asp:TextBox id="txtPriceAdultInsurance" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Giá trẻ em:</td>
                            <td><asp:TextBox id="txtPriceChildInsurance" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Giá trẻ nhỏ:</td>
                            <td><asp:TextBox id="txtPriceBabyInsurance" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Số lượng người lớn:</td>
                            <td><asp:TextBox id="txtQuantityAdultInsurance" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Số lượng trẻ em:</td>
                            <td><asp:TextBox id="txtQuantityChildInsurance" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Số lượng trẻ nhỏ:</td>
                            <td><asp:TextBox id="txtQuantityBabyInsurance" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Vat:</td>
                            <td><asp:TextBox ID="txtVATInsurance" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Tổng chi phí:</td>
                            <td><asp:Label id="lbTotalPriceInsurance" runat="server"></asp:Label></td>
                        </tr>
                        <tr>
                            <td>Ghi chú:</td>
                            <td><asp:TextBox id="txtNoteInsurance" TextMode="MultiLine" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td  class="button">
						         <input  id="btnInsertInsurance" class="btnsave" type="button" value="Thêm" calculatorid="-1"/>
                                <input id="btnDeleteInsurance" class="btnDeleteInsurance"  type="button" value="Hủy" calculatorid="-1" />
					        </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>  
    <%-------------------------------------------------------------popup visa------------------------%>
        <div class="popup-main popup-ticket-visa">
        <div class="popup-content">
            <div class="m" style="float:left; width:100%">
                <div class="admin-left">
                    <table >
                        <tr >
                            <td>Nhà cung cấp:</td>
                            <td><asp:DropDownList ID="ddlPartnerNameVisa" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Loại Visa:</td>
                            <td><asp:DropDownList ID="ddlVisaTypeNameVisa" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Visa:</td>
                            <td><asp:DropDownList ID="ddlVisaNameVisa" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Giá người lớn:</td>
                            <td><asp:TextBox ID="txtPriceAdultsVisa" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Chi phí dịch hồ sơ người lớn:</td>
                            <td><asp:TextBox ID="txtTranslateAdultVisa" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Chi phí khác người lớn:</td>
                            <td><asp:TextBox ID="txtOtherCostAdultVisa" runat="server"></asp:TextBox></td>
                   
                        </tr>
                        <tr>
                            <td>Giá trẻ em:</td>
                             <td><asp:TextBox ID="txtPriceChildVisa" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Chi phí dịch hồ sơ trẻ em:</td>
                              <td><asp:TextBox ID="txtTranslateChildVisa" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Chi phí khác trẻ em:</td>
                             <td><asp:TextBox ID="txtOtherCostChildVisa" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Giá trẻ nhỏ:</td>
                             <td><asp:TextBox ID="txtPriceBabyVisa" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Chi phí dịch hồ sơ trẻ nhỏ:</td>
                            <td><asp:TextBox ID="txtTranslateBabyVisa" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Chi khác trẻ nhỏ:</td>
                            <td><asp:TextBox ID="txtOtherCostBabyVisa" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Số lượng người lớn:</td>
                           <td><asp:TextBox ID="txtQuantityAdultsVisa" runat="server"></asp:TextBox></td>
                   
                        </tr>
                        <tr>
                            <td>Số lượng trẻ em:</td>
                             <td><asp:TextBox ID="txtQuantityChildVisa" runat="server"></asp:TextBox></td>
                   
                        </tr>
                        <tr>
                            <td>Số lượng trẻ nhỏ:</td>
                             <td><asp:TextBox ID="txtQuantityBabyVisa" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Vat:</td>
                            <td><asp:TextBox ID="txtVatVisa" runat="server"></asp:TextBox></td>
                        </tr>
                         <tr>
                            <td>Tổng chi phí:</td>
                            <td><asp:TextBox ID="txtTotalPriceVisa" runat="server"></asp:TextBox></td>
                        </tr>
                         <tr>
                            <td>Ghi chú</td>
                            <td><asp:TextBox ID="txtNoteVisa" TextMode="MultiLine" runat="server" Width="390px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td  class="button">
                                <input id="btnInsertVisa" type="button" value="Thêm" calculatorid="-1" />
                                <input id="btnDeleteVisa" class="btnDeleteVisa" type="button" value="Hủy" calculatorid="-1" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>  
    <%-------------------------------------------------------------popup dich Hoa Hong------------------------%>
        <div class="popup-main popup-ticket-commission">
        <div class="popup-content">
            <div class="m" style="float:left; width:100%">
                <div class="admin-left">
                    <table >
                        <tr >
                            <td>Người Nhận:</td>
                            <td><asp:TextBox ID="txtHoTenHH" runat="server" Width="200px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Số lượng người lớn:</td>
                             <td><asp:TextBox ID="txtSoNguoiLonHH" runat="server" Width="50px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Số lượng trẻ em:</td>
                            <td><asp:TextBox ID="txtSoTreEmHH" runat="server" Width="50px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Số lượng trẻ nhỏ:</td>
                            <td><asp:TextBox ID="txtSoTBabyHH" runat="server" Width="50px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Hoa hồng/ khách người lớn:</td>
                            <td><asp:TextBox ID="txtGiaNguoiLonHH" runat="server" Width="50px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Hoa hồng/ khách trẻ em:</td>
                            <td><asp:TextBox ID="txtGiaTreEmHH" runat="server" Width="50px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Hoa hồng/ khách trẻ nhỏ:</td>
                            <td><asp:TextBox ID="txtGiaBabyHH" runat="server" Width="50px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>VAT:</td>
                            <td><asp:TextBox ID="txtVatHH" runat="server" Width="100px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Tổng chi phí:</td>
                            <td><asp:TextBox ID="txtTongHH" runat="server" Width="50px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Ghi Chu</td>
                            <td><asp:TextBox ID="txtNoteHH" TextMode="MultiLine" runat="server" Width="50px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td></td>
                             <td class="button">
                                <input id="btnInsertHH" type="button" value="Thêm" calculatorid="-1" />
                                <input id="btnDeleteHH" class="btnDeleteHH" type="button" value="hủy" calculatorid="-1" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div> 
    <%-------------------------------------------------------------popup dich Huong dan vien------------------------%>
        <div class="popup-main popup-ticket-travelGuide">
        <div class="popup-content">
            <div class="m" style="float:left; width:100%">
                <div class="admin-left">
                    <table >
                        <tr >
                            <td>Loại HDV:</td>
                            <td><asp:DropDownList ID="ddlTravelGuideType" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Ngày bắt đầu:</td>
                              <td><input type="text" id="dteBeginDateTravelGuide" placeholder="Clic chọn ngày" readonly="readonly" runat="server" /></td>
                        </tr>
                        <tr>
                            <td>Ngày kết thúc:</td>
                            <td><input type="text" id="dteEndDateTravelGuide" placeholder="Clic chọn ngày" readonly="readonly" runat="server" /></td>
                        </tr>
                        <tr>
                            <td>Tổng số ngày:</td>
                            <td class="tr"><asp:TextBox ID="txtQuantityDateTravelGuide" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Ngôn ngữ:</td>
                            <td><asp:DropDownList ID="ddlLanguageTravelGuide" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Giới tính:</td>
                            <td><asp:DropDownList ID="ddlGenderTravelGuide" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Trình độ:</td>
                            <td><asp:DropDownList ID="ddlLevelTravelGuide" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>HDV:</td>
                            <td><asp:DropDownList ID="ddlTravelGuide" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Tiền công:</td>
                            <td class="tr"><asp:TextBox ID="txtPriceTravelGuide" runat="server"></asp:TextBox></td>
                    
                        </tr>
                        <tr>
                            <td>Tiền tip:</td>
                            <td class="tr"><asp:TextBox ID="txtPriceTipTravelGuide" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Vat:</td>
                            <td><asp:TextBox ID="txtVatTravelGuide" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Tổng chi phí:</td>
                             <td class="tr"><asp:TextBox ID="txtTotalPriceTravelGuide" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Ghi chú:</td>
                             <td class="tr"><asp:TextBox ID="txtNoteTravelGuide" TextMode="MultiLine" width="390px" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <input id="btnInsertTravelGuide" class="btnInsertTravelGuide"  type="button" value="Thêm" calculatorid="-1" />
                                <input id="btnDeleteTravelGuide" class="btnDeleteTravelGuide"  type="button" value="Hủy" calculatorid="-1" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
   <%-------------------------------------------------------------popup land tour------------------------%>
        <div class="popup-main popup-ticket-landtour">
        <div class="popup-content">
            <div class="m" style="float:left; width:100%">
                <div class="admin-left">
                    <table >
                        <tr >
                            <td>Nhà cung cấp:</td>
                            <td><asp:DropDownList ID="ddlPartnerLandTour" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Land Tour</td>
                            <td><asp:DropDownList ID="ddlLandTour" runat="server"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>Ngày bắt đầu:</td>
                            <td><input type="text" id="dteBeginDateLandTour" placeholder="Click chọn ngày" readonly="readonly" runat="server" /></td>
                        </tr>
                        <tr>
                            <td>Giá người lớn:</td>
                            <td><asp:TextBox id="txtPriceAdultLandTour" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Giá trẻ em:</td>
                            <td><asp:TextBox id="txtPriceChildLandTour" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Giá trẻ nhỏ:</td>
                             <td><asp:TextBox id="txtPriceBabyLandTour" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Số lượng người lớn:</td>
                            <td><asp:TextBox id="txtQuantityAdultLandTour" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Số lượng trẻ em:</td>
                            <td><asp:TextBox id="txtQuantityChildLandTour" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Số lượng trẻ nhỏ:</td>
                            <td><asp:TextBox id="txtQuantityBabyLandTour" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Vat:</td>
                            <td><asp:TextBox ID="txtVATLandTour" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>Tổng chi phí:</td>
                            <td><asp:Label id="lbTotalPriceLandTour" runat="server"></asp:Label></td>
                        </tr>
                        <tr>
                            <td>Ghi chú:</td>
                            <td><asp:TextBox ID="txtNoteLandTour" TextMode="MultiLine" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td  class="button">
						        <input  id="btnInsertLandTour" class="btnsave" type="button" value="Thêm" calculatorid="-1"/>
                                <input id="btnDeleteLandTour" class="btnDeleteLandTour"  type="button" value="Hủy" calculatorid="-1" />
					        </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>  
    <link rel="stylesheet" href="/css/datepicker/jquery.ui.all.css" />
	<script type="text/javascript" src="/js/ui/jquery.ui.core.js"></script>
	<script type="text/javascript" src="/js/ui/jquery.ui.datepicker.js"></script>
	<script type="text/javascript">
	    $(function () {
	        $("#<%= dteBeginDateTour.ClientID %>").datepicker({
	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });
	        $("#<%= dteEndDateTour.ClientID %>").datepicker({

	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });
	        $("#<%= dteGoDateAir.ClientID %>").datepicker({
	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });

	        $("#<%= dteBeginDateInsurance.ClientID%>").datepicker({
	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });
	        $("#<%= dteEndDateInsurance.ClientID%>").datepicker({
	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });


	        $("#<%= dteBeginDateTravelGuide.ClientID %>").datepicker({

	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });
	        $("#<%= dteEndDateTravelGuide.ClientID %>").datepicker({

	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });
	        $("#<%= dteBeginDateLandTour.ClientID%>").datepicker({
	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });

	    });
	</script>
      <script src="../js/jquery.ChietTinhTour.js"></script>
    <script src="../js/jquery.ChietTinh.js"></script>
    <script src="../js/jquery.address.js"></script>
    <script src="../js/jquery.ChietTinhBaoHiem.js"></script>
    <script src="../js/jquery.ChietTinhVisa.js"></script>
    <script src="../js/jquery.ChietTinhHoaHong.js"></script>
    <script src="../js/jquery.location.js"></script>
    <script src="../js/jquery.ChietTinhHDV.js"></script>
    <script src="../js/jquery.ChietTinhLandTour.js"></script>
    <script src="../js/jquery.CalculatorHasLandTour.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            //TotalPriceAdults();
            //TotalPriceChild();
            //TotalPriceBaby();

            CalculatorTour('#<%=txtQuantityAdultsTour.ClientID%>', '#<%=txtQuantityChildTour.ClientID%>', '#<%=txtQuantityBabyTour.ClientID%>',
                        '#<%=dteBeginDateTour.ClientID%>', '#<%=ddlBeginHourTour.ClientID%>', '#<%=ddlBeginMinuteTour.ClientID%>',
                        '#<%=dteEndDateTour.ClientID%>', '#<%=ddlEndHourTour.ClientID%>', '#<%=ddlEndMinuteTour.ClientID%>',
                        '#<%=txtTotalDayTour.ClientID%>', '#<%=txtTotalNightTour.ClientID%>',
                        '<%=tourInfo.QuantityAdult%>', '<%=tourInfo.QuantityChild%>', '<%=tourInfo.QuantityBaby%>',
                        '<%=tourInfo.BeginDate.ToShortDateString()%>', '<%=tourInfo.BeginDate.Hour%>', '<%=tourInfo.BeginDate.Minute%>',
                        '<%=tourInfo.EndDate.ToShortDateString()%>', '<%=tourInfo.EndDate.Hour%>', '<%=tourInfo.EndDate.Minute%>',
                        '<%=tourInfo.QuantityDay%>', '<%=tourInfo.QuantityNight%>');


            CalculatorAir('#<%= txtTotalPriceAir.ClientID%>', '#<%= ddlScheduleAir.ClientID%>',
                        '#<%= ddlFlightArrivalsAir.ClientID%>', '#<%= ddlConcernAir.ClientID%>',
                        '<%= tourInfo.TourId %>', '#<%=ddlTicketAir.ClientID%>',
                        '#<%=txtPriceAdultAir.ClientID%>', '#<%=txtPriceChildAir.ClientID%>',
                        '#<%=dteGoDateAir.ClientID%>', '#<%=txtVatAir.ClientID%>',
                        '<%= tourInfo.Season%>', '#<%= txtQuantityAdultsAir.ClientID%>',
                        '#<%= txtQuantityChildAir.ClientID%>', '#<%=txtPriceBabyAir.ClientID%>',
                        '#<%=txtQuantityBabyAir.ClientID%>', '#<%=txtNoteAir.ClientID%>');

            InsertCalculatorInsurance('#<%=ddlPartnerInsurance.ClientID%>', '#<%=ddlInsurance.ClientID%>',
                                    '#<%=dteBeginDateInsurance.ClientID%>', '#<%=dteEndDateInsurance.ClientID%>',
                                    '#<%=lbCountNightInsurance.ClientID%>', '#<%=txtPriceAdultInsurance.ClientID%>',
                                    '#<%=txtPriceChildInsurance.ClientID%>', '#<%=txtQuantityAdultInsurance.ClientID%>',
                                    '#<%=txtQuantityChildInsurance.ClientID%>', '#<%=txtVATInsurance.ClientID%>',
                                    '#<%=lbTotalPriceInsurance.ClientID%>', '<%=tourInfo.TourId%>',
                                    '#<%=txtPriceBabyInsurance.ClientID%>', '#<%=txtQuantityBabyInsurance.ClientID%>',
                                    '#<%=txtNoteInsurance.ClientID%>');

            CalculatorTravelGuide('#<%=ddlLanguageTravelGuide.ClientID%>', '#<%=ddlGenderTravelGuide.ClientID%>',
                                '#<%=ddlLevelTravelGuide.ClientID%>', '#<%=ddlTravelGuide.ClientID%>',
                                '#<%=ddlTravelGuideType.ClientID%>', '#<%=dteBeginDateTravelGuide.ClientID%>',
                                '#<%=dteEndDateTravelGuide.ClientID%>', '#<%=txtQuantityDateTravelGuide.ClientID%>',
                                '#<%=txtPriceTravelGuide.ClientID%>', '#<%=txtPriceTipTravelGuide.ClientID%>',
                                '#<%=txtVatTravelGuide.ClientID%>', '#<%=txtTotalPriceTravelGuide.ClientID%>',
                                '<%=tourInfo.BeginDate.ToShortDateString()%>', '<%=tourInfo.EndDate.ToShortDateString()%>',
                                '<%=tourInfo.TourId%>', '<%=tourInfo.QuantityAdult%>', '<%=tourInfo.QuantityChild%>',
                                '#<%=txtNoteTravelGuide.ClientID%>');

            var seasonTour = '<%= tourInfo.Season%>';
            var tourInfo = '<%= tourInfo.TourId%>';

            CalculatorVisa($('#<%=ddlPartnerNameVisa.ClientID %>'), $('#<%=ddlVisaTypeNameVisa.ClientID %>'),
                        $('#<%=ddlVisaNameVisa.ClientID %>'), $('#<%=txtPriceAdultsVisa.ClientID %>'),
                        $('#<%=txtTranslateAdultVisa.ClientID %>'), $('#<%=txtOtherCostAdultVisa.ClientID %>'),
                        $('#<%=txtPriceChildVisa.ClientID %>'), $('#<%=txtTranslateChildVisa.ClientID %>'),
                        $('#<%=txtOtherCostChildVisa.ClientID %>'), $('#<%=txtQuantityAdultsVisa.ClientID %>'),
                        $('#<%=txtQuantityChildVisa.ClientID %>'), $('#<%=txtVatVisa.ClientID %>'),
                        $('#<%=txtTotalPriceVisa.ClientID %>'), $('#<%=txtNoteVisa.ClientID %>'),
                        seasonTour, tourInfo,
                        $('#<%=txtPriceBabyVisa.ClientID %>'), $('#<%=txtTranslateBabyVisa.ClientID %>'),
                        $('#<%=txtOtherCostBabyVisa.ClientID %>'), $('#<%=txtQuantityBabyVisa.ClientID %>'));


            CalculatorHH($('#<%=txtHoTenHH.ClientID %>'), $('#<%=txtSoNguoiLonHH.ClientID %>'), $('#<%=txtSoTreEmHH.ClientID %>'),
                            $('#<%=txtGiaNguoiLonHH.ClientID %>'), $('#<%=txtGiaTreEmHH.ClientID %>'), $('#<%=txtVatHH.ClientID %>'),
                            $('#<%=txtTongHH.ClientID %>'), seasonTour, tourInfo, $('#<%=txtGiaBabyHH.ClientID %>'),
                            $('#<%=txtSoTBabyHH.ClientID %>'), '#<%=txtNoteHH.ClientID %>');

            InsertCalculatorLandTour('#<%=ddlPartnerLandTour.ClientID%>', '#<%=ddlLandTour.ClientID%>', '#<%=dteBeginDateLandTour.ClientID%>', '#<%=txtPriceAdultLandTour.ClientID%>', '#<%=txtPriceChildLandTour.ClientID%>', '#<%=txtQuantityAdultLandTour.ClientID%>', '#<%=txtQuantityChildLandTour.ClientID%>', '#<%=txtVATLandTour.ClientID%>', '#<%=lbTotalPriceLandTour.ClientID%>', '<%=tourInfo.TourId%>', '#<%=txtPriceBabyLandTour.ClientID%>', '#<%=txtQuantityBabyLandTour.ClientID%>', '#<%=txtNoteLandTour.ClientID%>');
        });
    </script>
  

    
</asp:content>
